﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mimoza.Common
{
    public class Logger
    {
        static Logger()
        {
            Log.Trace("============================================");
            Log.Trace("========== Start log of application ========");
            Log.Trace("============================================");
        }

        static public NLog.Logger Log
        {
            get
            {
                return m_logger;
            }
        }

        //static NLog.Logger m_logger = NLog.LogManager.GetCurrentClassLogger();
        static NLog.Logger m_logger = NLog.LogManager.GetLogger("MIMOZA");
    }

    public class TimeLogger
    {
        public TimeLogger(string logStr)
        {
            m_logStr = logStr;
            Logger.Log.Info(logStr + " ...");
        }

        public void Finish()
        {
            Logger.Log.Info(m_logStr + " ...OK");
        }

        string m_logStr;
    }
}
